<?php
namespace app\home\model;

use think\Model;

class User extends Model
{
   protected $table = 'rd_home_users';


//    protected function getGenderAttr($value,$data)
//    {
//        $status = [1=>'男',2=>'女'];
//        return isset($status[$data['gender']]) ? $status[$data['gender']] : '未设定';
//    }
//    protected function getOperationtimeAttr($value,$data)
//    {
//        return date('Y-m-d H:i:s',$data['operation_time']);
//    }
    protected function getMarriageAttr($value,$data)
    {
        $status = [1=>'未婚',2=>'离异'];
        return isset($status[$data['marriage']]) ? $status[$data['marriage']] : '未设定';
    }
//    protected function getStatusAttr($value,$data)
//    {
//        $status = [1=>'正常',2=>'禁用'];
//        return isset($status[$data['status']]) ? $status[$data['status']] : '未设定';
//    }

    /**
     * 显示列表.
     *
     * @return \think\Response
     */
    public  function lists($data){
        //


    }
}